package com.code.design.model.demo.responsibilitychain;

/**
 * 每一个Handler对象都包含着一个successor成员，指向它的下一个任务处理者，就像链表节点的next指针一样
 *
 * @author tangyifei
 */
abstract public class Handler {

    protected Handler successor;

    public void setSuccessor(Handler successor) {
        this.successor = successor;
    }

    abstract String handleRequest(String msg);
}
